<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<!-- 标题 -->
	<title>掌柜</title>
	<!-- 关键词 -->
	<meta name="keywords" content="" />
	<!-- 网站简介 -->
    <meta name="description" content="" />
    <!-- 自适应屏幕 -->
	<meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
	<!-- IE兼容 -->
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<!-- 最新 Bootstrap 核心 CSS 文件 -->
	<link rel="stylesheet" href="css/bootstrap.css">
	<!-- 核心 CSS 文件 -->
	<link rel="stylesheet" href="css/style.css" type="text/css">
</head>
<body>
    <!-- Start modify -->
    <div class="modify">
        <!-- 固定顶部 -->
        <div class="fix-top">
        	修改密码
        	<a href=""></a>
        </div>
        <div class="modify-content">
        	<div id="warning"></div>
        	<form action="index.html" method="post">
        	    <div class="modify-ga clearfix">
				    <span for="">原密码</span>
				    <input type="text" class="yl-password" name="seat" id="modify-ylpwd">
				</div>
				<div class="modify-gc clearfix">
				    <span for="">密码</span>
				    <input type="password" class="password" name="password" id="modify-pwd">
				</div>
				<div class="modify-gb clearfix">
				    <span for="">确认密码</span>
				    <input type="password" class="qr-password" name="password" id="modify-qrpwd">
				</div>
        		<input type="submit" value="确认" class="denglu" id="modify-queren">
        	</form>
        </div>
    </div>
    <!-- End modify -->

	<!-- jQuery文件 -->
	<script src="js/jquery.min.js"></script>
	<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
	<script src="js/bootstrap.min.js"></script>
	<script>
		$("#modify-queren").on('click',function(){//登陆按钮
	    var ylpwd = $("#modify-ylpwd").val();
	    var pwd = $("#modify-pwd").val();
	    var qrpwd = $("#modify-qrpwd").val();
		    if(ylpwd==''){
				document.getElementById('warning').innerHTML = "原密码不能为空";
				$("#modify-ylpwd").focus();
				return false;
		    }
			if(pwd==''){
				document.getElementById('warning').innerHTML = "密码不能为空";
			    $("#modify-pwd").focus();
				return false;
			}
			if(qrpwd==''){
				document.getElementById('warning').innerHTML = "确认密码不能为空";
			    $("#modify-qrpwd").focus();
				return false;
			}
			if(ylpwd!="123456"){
				document.getElementById("warning").innerHTML = "原密码输入错误";
				$("#modify-ylpwd").focus();
				return false;
			}
            if(pwd!=qrpwd){
            	document.getElementById('warning').innerHTML = "两次密码输入不一致";
			    $("#modify-pwd").focus();
				return false;
            }
		});

		function getCookie(name){
			//cookie检查
			var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
			if(arr=document.cookie.match(reg))
			return unescape(arr[2]);
			else
			return null;
		}
	</script>
</body>
</html>